package com.czp.mall.feign.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.czp.mall.config.ItemFeignClientConfiguration;
import com.czp.mall.config.ItemFeignHystrixDisableClientConfiguration;
import com.czp.mall.feign.pojo.Item;
import com.czp.mall.feign.service.impl.ItemServiceFeignDisableHystrixClientFallback;
import com.czp.mall.feign.service.impl.ItemServiceFeignHystrixClientFallback;

import feign.Param;
import feign.RequestLine;

//@FeignClient(name = "czp-mall-item" , 
//			configuration = ItemFeignHystrixDisableClientConfiguration.class,  // 自定义配置方式
//			fallback = ItemServiceFeignDisableHystrixClientFallback.class )// feign中使用hystrix回调类
public interface ItemServiceFeignHystrixDisableClient {

	// 使用feign默认的注解实现
	@RequestLine("GET /item/{id}")
	 public Item queryItemById(@Param("id") Long id);
	
}
